<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>笔趣阁</title>
    <script type="text/javascript" src="/js/jquery-1.12.4.js"></script>
</head>
<style>
    td {
        border: 1px solid #0094ff;
    }
</style>
<script type="application/javascript">
    function download() {
        const url = $("#input-url").val();
        console.log(url)
        window.location.href = "start-download?url=" + url
    }


    function doDownload(id) {
        window.location.href = "download?novelId=" + id
    }
</script>
<body>
<h1 style="text-align: center;color: red">笔趣阁小说下载(www.bswtan.com)</h1>

<table>
    <tr>
        <td>小说名</td>
        <td>状态</td>
        <td>最新章节</td>
        <td>总章节数</td>
        <td>下载</td>
    </tr>

    <tbody>
    <tr th:each="item :${list}">
        <td th:text="${item.getNovelName()}"></td>
        <td th:text="${item.getStatus()}"></td>
        <td th:text="${item.getLatestChapter()}"></td>
        <td th:text="${item.getChapterNum()}"></td>
        <td><a th:href="@{download(novelId=${item.getId()})}">下载</a></td>
    </tr>

    </tbody>
</table>


<input id="input-url" type="text" name="url">
<button type="button" onclick="download()">开始解析</button>


</body>

</html>